<?php if($module->profiles) : ?>

    <ul class="block-grid two-up">

        <?php foreach($module->profiles as $profile): ?>
        <li>

            <div class="clear profile-item">
                <figure class="left profile-picture">
                    <?php if($profile->hasThumb()): ?>
                    <img src="<?= $profile->getThumb() ?>" alt="<?= $profile->getName() ?>">
                    <?php else: ?>
                    <img src="http://placehold.it/120&text=No+Picture" alt="Placeholder Image">
                    <?php endif ?>
                </figure>
                <div class="profile-data">
                    <p>
                        <strong><?= $profile->getName() ?></strong><br>
                        <?php if($profile->hasTitle()): ?> <?= $profile->getTitle() ?><br><?php endif ?>
                        <?php if($profile->hasEmail()): ?><a href="mailto:<?= $profile->getEmail() ?>"><?= $profile->getEmail() ?></a><br><?php endif ?>
                        <?php if($profile->hasFacebook()): ?>
                        <a href="http://www.fb.me/<?= $profile->getFacebook() ?>" class="plain" target="_blank">
                            <i class="foundicon-facebook"></i> <?= $profile->getFacebook() ?>
                        </a><br><?php endif ?>
                        <?php if($profile->hasTwitter()): ?>
                        <a href="http://twitter.com/<?= $profile->getTwitter() ?>" class="plain" target="_blank">
                            <i class="foundicon-twitter"></i> @<?= $profile->getTwitter() ?>
                        </a><br><?php endif ?>
                        <?php if($profile->hasUrl()): ?>
                        <a href="http://<?= $profile->getUrl() ?>" class="plain" target="_blank">
                            <?= $profile->getUrl() ?>
                        </a><?php endif ?>
                    </p>
                    <?php if($profile->getBio()): ?>
                    <a href="<?= url('staff/' . $profile->getSlug()) ?>" class="small button">View profile &raquo;</a>
                    <?php endif; ?>
                </div>
            </div>

        </li>
        <?php endforeach ?>

    </ul>

<?php endif ?>
